<template>
    <div>
        <num-data :name="numData" @add='addClick' @del='delClick'></num-data>
    </div>
</template>

<script>
import  numData from './numData'
    export default {
        name: 'name',
        components:{
         numData,
        },
        data() {
            return {
                numData:2
            }
        },
        methods: {
            addClick(){
                this.numData++
            },
             delClick(){
                this.numData--
            }
        }
    }
</script>

<style scoped>

</style>